home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls001a.1 / usr / lib / grafinfo / cnrstone / pc1280.xgi / pc1280.xgi
Encoding:
Text File  |  1992-04-23  |  4.6 KB  |  155 lines

  1. /*
  2.  * @(#) pc1280.xgi 1.4 91/10/18 
  3.  *
  4.  * Copyright (C) 1991 The Santa Cruz Operation, Inc.
  5.  *
  6.  * The information in this file is provided for the exclusive use of the
  7.  * licensees of The Santa Cruz Operation, Inc.  Such users have the right 
  8.  * to use, modify, and incorporate this code into other products for purposes 
  9.  * authorized by the license agreement provided they include this notice 
  10.  * and the associated copyright notice with any such product.  The 
  11.  * information in this file is provided "AS IS" without warranty.
  12.  * 
  13.  */
  14.  
  15. /* *********************************************************************** *
  16.  * CNRSTONE/PC1280.XGI - XEGIA(tm) GrafInfo File for Cornerstone           *
  17.  *                                                                         *
  18.  *           Copyright (c) 1990 Locus Computing Corporation                *
  19.  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
  20.  *                                                                         *
  21.  *                    Cnrstone.PC1280.HGA.1280x960-2                       *
  22.  *                                                                         *
  23.  * *********************************************************************** */
  24.  
  25.  
  26. VENDOR CNRSTONE   "Cornerstone"
  27.  MODEL  PC1280     "PC1280"
  28.   CLASS  HGA        "HGA"
  29.    MODE   1280x960-2 "1280x960 Monochrome"
  30.  
  31.       MEMORY (0xB0000,0x8000);
  32.       PORT   (0x3B0,0x3B1,0x3B8,0x3BF);
  33.  
  34.       DATA
  35.          {
  36.      XDRIVER     = "mw";
  37.      VISUAL      = "StaticGray";
  38.      DEPTH       = 1;
  39.          DEVCLASS    = 0;
  40.          DEVTYPE     = 0x86;
  41.          DEVTECH     = 02;    /* Mono and banked */
  42.          PIXBYTES    = 0x100;
  43.          PIXWIDTH    = 1280;
  44.          PIXHEIGHT   = 960;
  45.          PIXRESX     = 114;
  46.          PIXRESY     = 120;
  47.          PIXBITS     = 1;
  48.          PIXPLANES   = 1;
  49.          MAPFLAGS    = 0;
  50.          BASEADDRESS = 0xB0000;
  51.          INTERLEAVE  = 0;
  52.          INTERSIZE   = 0;
  53.      MAPWINSCANS = 64;
  54.      MAPTYPE     = "Cornerstone";
  55.          }
  56.  
  57.       PROCEDURE SetGraphics
  58.          {
  59.              in(r0,0x03b0);        /* Unlock everything */
  60.              in(r0,0x03b0);        /* (Enable Corner full mode */
  61.  
  62.              in(r0,0x03b8);        /* Get mode register */
  63.              and(r0,0xf7);        /* Blank text screen */
  64.              set(r3,r0);        /* Remember this value */
  65.              out(0x03b8,r0);        /* Screen now blank */
  66.  
  67.              out(0x03b0,0x32);        /* CTL register */
  68.              in(r0,0x03b1);
  69.              or(r0,0x80);        /* Bit 7 is Corn hi-res */
  70.              and(r0,0xbf);        /* Corn hi-res video enable off */
  71.              out(0x03b1,r0);
  72.  
  73.              in(r0,0x03bf);        /* Herc specific functions */
  74.              set(r4,r0);
  75.              or(r0,3);            /* 0 - graf mode; 1 - page 2 en */
  76.              out(0x03bf,r0);
  77.  
  78.              set(r0,r3);        /* Do funny stuff to force init */
  79.              xor(r0,0x82);
  80.              out(0x03b8,r0);
  81.              wait(3450);
  82.              xor(r0,0x82);
  83.              out(0x03b8,r0);
  84.              wait(3450);
  85.  
  86.              out(0x03bf,r4);        /* Restore this reg */
  87.  
  88.              out(0x03b0,0x32);
  89.              in(r0,0x03b1);
  90.              or(r0,0x40);        /* Turn on Corn hi-res enable */
  91.              out(0x03b1,r0);
  92.          }
  93.  
  94.  
  95.       PROCEDURE SetText
  96.          {
  97.          /*
  98.           * Put the card back into Hercules text mode, otherwise,
  99.           * the card can hang.
  100.           */
  101.              out(0x3B8,0x22);           /* mode, disable */
  102.              out(0x3B8,0x28);           /* mode - enable page 0 */
  103.  
  104.              in(r0,0x03b8);        /* Get mode register */
  105.              and(r0,0xf7);        /* Blank text screen */
  106.              out(0x03b8,r0);        /* Screen in now blank */
  107.  
  108.              out(0x3b0,0x32);        /* Back to herc mode */
  109.              in(r0,0x3b1);
  110.              and(r0,0x3f);
  111.              out(0x3b1,r0);
  112.  
  113.              out(0x3b0,0x21);        /* Turn off Corner full mode */
  114.              out(0x3b1,0);
  115.  
  116.              in(r0,0x03bf);
  117.              set(r4,r0);        /* Remember this value */
  118.              or(r0,3);            /* Enable graphics and page 2 */
  119.              out(0x03bf,r0);
  120.  
  121.              in(r0,0x3b8);        /* Do more funny things... */
  122.              xor(r0,0x82);
  123.              out(0x03b8,r0);
  124.              wait(3450);
  125.              xor(r0,0x82);
  126.              out(0x03b8,r0);
  127.              wait(3450);
  128.  
  129.              out(0x03bf,r4);        /* Restore value */
  130.              wait(3450);
  131.  
  132.              out(0x3b8,0x28);        /* Herc text mode */
  133.          }
  134.  
  135.  
  136.     PROCEDURE BlankScreen
  137.     {
  138.         out (0x3b0, 0x32);
  139.         in (r0, 0x3b1);
  140.         and (r0, 0xbf);        /* zero video enable bit */
  141.         out (0x3b0, 0x32);
  142.         out (0x3b1, r0);
  143.     }
  144.  
  145.     PROCEDURE UnBlankScreen
  146.     {
  147.         out (0x3b0, 0x32);
  148.         in (r0, 0x3b1);
  149.         or (r0, 0x40);        /* set video enable bit */
  150.         out (0x3b0, 0x32);
  151.         out (0x3b1, r0);
  152.     }
  153.  
  154. /* End of File - CNRSTONE/PC1280.XGI */
  155.